package gameLevel.classicLevel;

import object.Grass;
import object.Iron;
import object.Wall;
import tank.Dir;
import tank.EnemyTank;
import tank.TankType;

public class ClassicLevel_4 extends ClassicLevel{

    @Override
    protected void initEnemyTanks() {
        enemyTanks.add(new EnemyTank(TankType.ENEMY4, 11, 50, Dir.DOWN));
        enemyTanks.add(new EnemyTank(TankType.ENEMY4, 275, 110, Dir.DOWN));
        enemyTanks.add(new EnemyTank(TankType.ENEMY4, 385, 110, Dir.DOWN));
        enemyTanks.add(new EnemyTank(TankType.ENEMY4, 495, 110, Dir.DOWN));
        enemyTanks.add(new EnemyTank(TankType.ENEMY4, 741, 50, Dir.DOWN));

        enemyTankMove();
    }

    @Override
    protected void initTerrainLayout() {
        for(int i = 0; i < 6; i++){
            new Wall(10, 560 - i * 30);
            new Wall(40, 560 - i * 30);
            new Wall(160, 100 + i * 30);
            new Wall(600, 100 + i * 30);
            new Wall(730, 560 - i * 30);
            new Wall(760, 560 - i * 30);

            if(i >= 2){
                new Wall(130 + (i - 2) * 30, 350);
                new Wall(630 - (i - 2) * 30, 350);
            }

            if(i >= 3){
                new Iron(70 + (i - 3) * 30, 470);
                new Grass(355 + (i - 3) * 30, 385);
                new Iron(700 - (i - 3) * 30, 470);
            }

            if(i >= 4){
                new Iron(10 + (i - 4) * 30, 220);
                new Wall(190 - (i - 4) * 30, 250);
                new Iron(220, 30 + (i - 4) * 30);
                new Wall(220, 380 + (i - 4) * 30);
                new Iron(345, 250 + (i - 4) * 30);
                new Wall(355 - (i - 4) * 30, 310);
                new Wall(415 + (i - 4) * 30, 310);
                new Iron(425, 250 + (i - 4) * 30);
                new Iron(540, 30 + (i - 4) * 30);
                new Wall(540, 380 + (i - 4) * 30);
                new Wall(570 - (i - 4) * 30, 250);
                new Iron(760 - (i - 4) * 30, 220);
            }

            if(i == 5){
                new Iron(385, 80);
                new Wall(385, 310);
                new Iron(385, 415);
            }
        }
    }

}
